<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>报名结伴</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/travelContent.css"/>
    <link href="https://css.mafengwo.net/mobile/css/together/together.css?1526627473" rel="stylesheet" type="text/css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/plugins/form/jquery.form.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
</head>
<script>
    $(function () {
        var params = getParams();
        $("#Apply").click(function () {
            $("#detailForm").attr("action","/companions/"+params)
                $("#detailForm input[name='companion.id']").val(params.id);
            $("#detailForm").ajaxSubmit(function (data) {
                if (data.success) {
                    $(document).dialog({
                        autoClose: 1000,
                        content: '报名成功'
                    });
                    setTimeout(function () {
                        window.location.href = "/companionrequest.html?id="+params.id;
                    }, 1400);
                }
            })
        })
    })
</script>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
        </div>
    </div>
</div>

<div class="container">
    <form id="detailForm" method="post" action="">
        <input type="hidden" name="_method">
        <input type="hidden" name="companion.id">
        <label>我的联系方式:</label>
        <input type="text" name="phone" class="form-control" >
        <label>我的QQ:</label>
        <input type="number" name="QQ" class="form-control" >
        <label>备注:</label>
        <input type="text" name="remarks" class="form-control" >
    </form>
</div>

<div class="fixed-btm">
    <div class="btn-group">
        <span class="space"></span>
        <a  class="btn-join" id="Apply" >我要报名</a>
    </div>
</div>
</body>
</html>